package models;

import javax.persistence.Entity;

import play.db.jpa.Model;

@Entity
public class Usuario extends Model {

	public String email;
    public String password;
    public String nomeCompleto;
    public boolean isAdmin;
    
    public Usuario(String email, String password, String fullname) {
        this.email = email;
        this.password = password;
        this.nomeCompleto = fullname;
    }
    
    public static Usuario connect(String email, String password) {
        return find("byEmailAndPassword", email, password).first();
    }
}
